package cm.dayo7;

import java.util.HashSet;
import java.util.function.Consumer;

public class Tes5 {
    public static void main(String[] args) {
        HashSet<Student>hashSet=new HashSet<>();
        hashSet.add(new Student("张三",20,"男"));
        hashSet.add(new Student("李四",21,"女"));
        hashSet.add(new Student("张三",20,"男"));
        hashSet.forEach(new Consumer<Student>() {
            @Override
            public void accept(Student student) {
                System.out.println(student);
            }
        });
    }
}
